package com.ecoolex.ying.space.ws;

import java.util.List;

import org.apache.dubbo.config.annotation.Service;
import org.springframework.beans.factory.annotation.Autowired;

import com.ecoolex.framework.common.exception.BizException;
import com.ecoolex.framework.common.pojo.Page;
import com.ecoolex.framework.common.pojo.Pagination;
import com.ecoolex.framework.common.pojo.Sorting;
import com.ecoolex.ying.space.core.manager.EstateProjectActivityCouponManager;
import com.ecoolex.ying.space.core.manager.EstateProjectActivityCouponPackageManager;
import com.ecoolex.ying.space.core.manager.EstateProjectActivityGoodsCategoryManager;
import com.ecoolex.ying.space.core.manager.EstateProjectActivityGoodsManager;
import com.ecoolex.ying.space.core.manager.EstateProjectActivityHouseModelItemsGoodsManager;
import com.ecoolex.ying.space.core.manager.EstateProjectActivityHouseModelItemsManager;
import com.ecoolex.ying.space.core.manager.EstateProjectActivityHouseModelManager;
import com.ecoolex.ying.space.core.manager.EstateProjectActivityManager;
import com.ecoolex.ying.space.entity.EstateProjectActivity;
import com.ecoolex.ying.space.entity.EstateProjectActivityCoupon;
import com.ecoolex.ying.space.entity.EstateProjectActivityCouponPackage;
import com.ecoolex.ying.space.entity.EstateProjectActivityGoods;
import com.ecoolex.ying.space.entity.EstateProjectActivityGoodsCategory;
import com.ecoolex.ying.space.entity.EstateProjectActivityHouseModel;
import com.ecoolex.ying.space.entity.EstateProjectActivityHouseModelItems;
import com.ecoolex.ying.space.entity.EstateProjectActivityHouseModelItemsGoods;
import com.ecoolex.ying.space.pojo.AddEstateProjectActivityGoodsDTO;
import com.ecoolex.ying.space.pojo.AddEstateProjectActivityHouseModelItemsDTO;

@Service
public class EstateProjectActivityServiceImpl implements EstateProjectActivityService{
	
	@Autowired
	private EstateProjectActivityManager estateProjectActivityManager;

	@Override
	public EstateProjectActivity get(Integer projectId) {
		return estateProjectActivityManager.get(projectId);
	}

	@Override
	public Pagination<EstateProjectActivity> query(Boolean online,Sorting[] sorts, Page page) {
		return estateProjectActivityManager.query(online,sorts, page);
	}
	
	@Override
	public EstateProjectActivity getOnline(Integer projectId) {
		return estateProjectActivityManager.getOnline(projectId);
	}

	@Override
	public Pagination<EstateProjectActivity> queryOnline(Page page) {
		return estateProjectActivityManager.queryOnline(page);
	}
	
	@Override
	public EstateProjectActivity add(EstateProjectActivity record, String createUser) throws BizException {
		return estateProjectActivityManager.add(record, createUser);
	}

	@Override
	public EstateProjectActivity edit(EstateProjectActivity record, String updateUser) throws BizException {
		return estateProjectActivityManager.edit(record, updateUser);
	}

	@Override
	public void delete(EstateProjectActivity record, String updateUser) throws BizException {
		estateProjectActivityManager.delete(record, updateUser);
	}

	@Override
	public void online(EstateProjectActivity record, String updateUser) throws BizException {
		estateProjectActivityManager.online(record, updateUser);
	}

	@Override
	public void offline(EstateProjectActivity record, String updateUser) throws BizException {
		estateProjectActivityManager.offline(record, updateUser);
	}
	
	@Autowired
	private EstateProjectActivityHouseModelManager modelManager;

	@Override
	public EstateProjectActivityHouseModel addModel(EstateProjectActivityHouseModel record, List<AddEstateProjectActivityHouseModelItemsDTO> itemsDTOList, String createUser) throws BizException {
		return modelManager.add(record, itemsDTOList, createUser);
	}

	@Override
	public EstateProjectActivityHouseModel editModel(EstateProjectActivityHouseModel record, List<AddEstateProjectActivityHouseModelItemsDTO> itemsDTOList, String updateUser) throws BizException {
		return modelManager.edit(record, itemsDTOList, updateUser);
	}
	
	@Override
	public List<EstateProjectActivityHouseModel> modelList(Integer projectId) {
		return modelManager.listByProjectId(projectId);
	}
	
	@Override
	public EstateProjectActivityHouseModel getEstateProjectActivityHouseModel(Integer modelId) {
		return modelManager.get(modelId);
	}
	
	@Override
	public void deleteEstateProjectActivityHouseModel(EstateProjectActivityHouseModel record, String updateUser) {
		modelManager.delete(record, updateUser);
	}

	@Override
	public Pagination<EstateProjectActivityHouseModel> modelList(Integer projectId, Page page) {
		return modelManager.modelList(projectId, page);
	}

	@Override
	public Pagination<EstateProjectActivityHouseModel> modelList(Integer projectId, Sorting[] sorts, Page page) {
		return modelManager.modelList(projectId, sorts, page);
	}

	
	@Autowired
	private EstateProjectActivityHouseModelItemsManager itemsManager;

	@Override
	public List<EstateProjectActivityHouseModelItems> itemsList(Integer modelId) {
		return itemsManager.listByModelId(modelId);
	}
	
	@Override
	public List<EstateProjectActivityGoods> listByItemId(Integer itemId) {
		return itemsManager.listByItemId(itemId);
	}
	
	@Override
	public List<EstateProjectActivityGoods> listByItemIdOnline(Integer itemId) {
		return itemsManager.listByItemIdOnline(itemId);
	}
	
	@Autowired
	private EstateProjectActivityGoodsManager goodsManager;

	@Override
	public EstateProjectActivityGoods getEstateProjectActivityGoods(Integer activityGoodsId) {
		return goodsManager.getEstateProjectActivityGoods(activityGoodsId);
	}

	@Override
	public Pagination<EstateProjectActivityGoods> queryEstateProjectActivityGoods(String activityName,Integer activityCategoryId,Boolean online,Sorting[] sorts, Page page) {
		return goodsManager.queryEstateProjectActivityGoods(activityName,activityCategoryId,online,sorts, page);
	}
	
	@Override
	public Pagination<EstateProjectActivityGoods> queryEstateProjectActivityGoodsForPrimaryCategory(String activityName, Integer activityCategoryId, Boolean online, Sorting[] sorts, Page page) {
		return goodsManager.queryEstateProjectActivityGoodsForPrimaryCategory(activityName, activityCategoryId, online, sorts, page);
	}
	
	@Override
	public Pagination<EstateProjectActivityGoods> queryEstateProjectActivityGoodsByCategoryId(Integer activityCategoryId, Page page) {
		return goodsManager.queryEstateProjectActivityGoodsByCategoryId(activityCategoryId, page);
	}

	@Override
	public EstateProjectActivityGoods addEstateProjectActivityGoods(AddEstateProjectActivityGoodsDTO record, String createUser) throws BizException {
		return goodsManager.addEstateProjectActivityGoods(record, createUser);
	}

	@Override
	public EstateProjectActivityGoods editEstateProjectActivityGoods(EstateProjectActivityGoods record, String updateUser) throws BizException {
		return goodsManager.editEstateProjectActivityGoods(record, updateUser);
	}

	@Override
	public void deleteEstateProjectActivityGoods(EstateProjectActivityGoods record, String updateUser) throws BizException {
		goodsManager.deleteEstateProjectActivityGoods(record, updateUser);
	}

	@Override
	public void onlineEstateProjectActivityGoods(EstateProjectActivityGoods record, String updateUser) throws BizException {
		goodsManager.onlineEstateProjectActivityGoods(record, updateUser);
	}

	@Override
	public void offlineEstateProjectActivityGoods(EstateProjectActivityGoods record, String updateUser) throws BizException {
		goodsManager.offlineEstateProjectActivityGoods(record, updateUser);
	}
	
	@Override
	public EstateProjectActivityGoods getByPickGoodsIdAndActivityCategoryId(Integer pickGoodsId, Integer activityCategoryId) {
		return goodsManager.getByPickGoodsIdAndActivityCategoryId(pickGoodsId, activityCategoryId);
	}
	
	@Autowired
	private EstateProjectActivityCouponManager estateProjectActivityCouponManager;

	@Override
	public EstateProjectActivityCoupon getEstateProjectActivityCoupon(Integer couponId) {
		return estateProjectActivityCouponManager.getEstateProjectActivityCoupon(couponId);
	}

	@Override
	public Pagination<EstateProjectActivityCoupon> queryEstateProjectActivityCoupon(Sorting[] sorts, Page page) {
		return estateProjectActivityCouponManager.queryEstateProjectActivityCoupon(sorts, page);
	}

	@Override
	public EstateProjectActivityCoupon getEstateProjectActivityCouponOnline(Integer couponId) {
		return estateProjectActivityCouponManager.getEstateProjectActivityCouponOnline(couponId);
	}

	@Override
	public Pagination<EstateProjectActivityCoupon> queryEstateProjectActivityCouponOnline(Page page) {
		return estateProjectActivityCouponManager.queryEstateProjectActivityCouponOnline(page);
	}
	
	@Override
	public EstateProjectActivityCoupon addEstateProjectActivityCoupon(EstateProjectActivityCoupon record, String createUser) {
		return estateProjectActivityCouponManager.addEstateProjectActivityCoupon(record, createUser);
	}

	@Override
	public EstateProjectActivityCoupon editEstateProjectActivityCoupon(EstateProjectActivityCoupon record, String updateUser) {
		return estateProjectActivityCouponManager.editEstateProjectActivityCoupon(record, updateUser);
	}

	@Override
	public void delEstateProjectActivityCoupon(EstateProjectActivityCoupon record, String updateUser) {
		estateProjectActivityCouponManager.delEstateProjectActivityCoupon(record, updateUser);
	}

	@Override
	public void onlineEstateProjectActivityCoupon(EstateProjectActivityCoupon record, String updateUser) {
		estateProjectActivityCouponManager.onlineEstateProjectActivityCoupon(record, updateUser);
	}

	@Override
	public void offlineEstateProjectActivityCoupon(EstateProjectActivityCoupon record, String updateUser) {
		estateProjectActivityCouponManager.offlineEstateProjectActivityCoupon(record, updateUser);
	}
	
	@Autowired
	private EstateProjectActivityGoodsCategoryManager categoryManager;

	@Override
	public EstateProjectActivityGoodsCategory getEstateProjectActivityGoodsCategory(Integer activityCategoryId) {
		return categoryManager.getEstateProjectActivityGoodsCategory(activityCategoryId);
	}

	@Override
	public Pagination<EstateProjectActivityGoodsCategory> queryEstateProjectActivityGoodsCategory(Integer projectId,String activityName,Boolean online, Integer level, Sorting[] sorts, Page page) {
		return categoryManager.queryEstateProjectActivityGoodsCategory(projectId,activityName,online, level, sorts, page);
	}
	
	@Override
	public List<EstateProjectActivityGoodsCategory> childrenCategory(Integer activityCategoryId) {
		return categoryManager.childrenCategory(activityCategoryId);
	}

	@Override
	public EstateProjectActivityGoodsCategory addEstateProjectActivityGoodsCategory(EstateProjectActivityGoodsCategory record, String createUser) {
		return categoryManager.addEstateProjectActivityGoodsCategory(record, createUser);
	}

	@Override
	public EstateProjectActivityGoodsCategory editEstateProjectActivityGoodsCategory(EstateProjectActivityGoodsCategory record, String updateUser) {
		return categoryManager.editEstateProjectActivityGoodsCategory(record, updateUser);
	}

	@Override
	public void delEstateProjectActivityGoodsCategory(EstateProjectActivityGoodsCategory record, String updateUser) {
		categoryManager.delEstateProjectActivityGoodsCategory(record, updateUser);
	}

	@Override
	public void onlineEstateProjectActivityGoodsCategory(EstateProjectActivityGoodsCategory record, String updateUser) {
		categoryManager.onlineEstateProjectActivityGoodsCategory(record, updateUser);
	}

	@Override
	public void offlineEstateProjectActivityGoodsCategory(EstateProjectActivityGoodsCategory record, String updateUser) {
		categoryManager.offlineEstateProjectActivityGoodsCategory(record, updateUser);
	}

	@Override
	public EstateProjectActivityGoodsCategory getEstateProjectActivityGoodsCategoryOnline(Integer activityCategoryId) {
		return categoryManager.getEstateProjectActivityGoodsCategoryOnline(activityCategoryId);
	}

	@Override
	public Pagination<EstateProjectActivityGoodsCategory> queryEstateProjectActivityGoodsCategoryOnline(Integer parentCategoryId, Page page) {
		return categoryManager.queryEstateProjectActivityGoodsCategoryOnline(parentCategoryId, page);
	}
	
	@Autowired
	private EstateProjectActivityCouponPackageManager packageManager;

	@Override
	public Pagination<EstateProjectActivityCouponPackage> couponPackageList(Integer status, Integer userId, Page page) {
		return packageManager.couponPackageList(status, userId, page);
	}

	@Override
	public EstateProjectActivityCouponPackage couponPackage(Integer id,Integer userId) {
		return packageManager.couponPackage(id,userId);
	}

	@Override
	public EstateProjectActivityCouponPackage getEstateProjectActivityCouponPackageByCode(String code, Integer userId) {
		return packageManager.getEstateProjectActivityCouponPackageByCode(code, userId);
	}
	
	@Override
	public EstateProjectActivityCouponPackage getCouponPackage(Integer id) {
		return packageManager.getCouponPackage(id);
	}

	@Override
	public Pagination<EstateProjectActivityCouponPackage> queryCouponPackage(String code, Integer status, Sorting[] sorts, Page page) {
		return packageManager.queryCouponPackage(code, status, sorts, page);
	}

	@Override
	public EstateProjectActivityCouponPackage getEstateProjectActivityCouponPackageByCode(String code) {
		return packageManager.getEstateProjectActivityCouponPackageByCode(code);
	}

	@Autowired
	private EstateProjectActivityHouseModelItemsGoodsManager itemsGoodsManager;
	
	@Override
	public List<EstateProjectActivityHouseModelItemsGoods> listByStorageId(String storageId) {
		return itemsGoodsManager.listByStorageId(storageId);
	}

}
